package com.erb.mapper;

import com.erb.entity.Pager;
import com.erb.entity.Redenvelopes;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminRedpacketMapper {
	List<Redenvelopes> selectAll(@Param("pager") Pager pager);

	Redenvelopes selectRedpacketById(@Param("id") Integer id);

	int deleteRedpacket(@Param("id") Integer id);

	int insertRedpacket(@Param("r") Redenvelopes redenvelopes);

	long updateStateForEndTime();

	Redenvelopes selectRedpacketByRedeemCode(@Param("code") String code);

	int updateRedpacket(@Param("r") Redenvelopes redenvelopes);
}
